<%@ Page Language="C#" %>

<%@ Register Namespace="Samples" TagPrefix="samples" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>FormattingExtender</title>
    <link type="text/css" href="Style/FormattingBehavior.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="TheScriptManager" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/ScriptLibrary/FormattingBehavior.js" />
        </Scripts>
    </asp:ScriptManager>
     
   <div class="form">
        <div>
            <span>Name:</span>
            <asp:TextBox ID="Name" runat="server"></asp:TextBox>
        </div>
        <div>
            <span>Last Name:</span>
            <asp:TextBox ID="LastName" runat="server"></asp:TextBox>
        </div>
    </div>
    
    <%-- Attach a FormattingExtender to the Name TextBox  --%>
    <samples:FormattingExtender ID="FormattingExtender1" runat="server"
                                TargetControlID="Name"
                                ScriptPath="~/ScriptLibrary/FormattingBehavior.js"
                                HoverCssClass="field_hover"
                                FocusCssClass="field_focus" />
    
    <%-- Attach a FormattingExtender to the LastName TextBox --%>                    
    <samples:FormattingExtender ID="FormattingExtender2" runat="server"
                                TargetControlID="LastName"
                                ScriptPath="~/ScriptLibrary/FormattingBehavior.js"
                                HoverCssClass="field_hover"
                                FocusCssClass="field_focus" />

    </form>
</body>
</html>
